<template>
  <div>
    <componA ref="headerChild" @isssiow="changeishow" @change="changelist" />
  </div>
</template>

<script>
import componA from '@/components/mainIn'
export default {
  name: 'Compon',
  components: { componA },
  data() {
    return {
      ishow: false
    }
  },
  computed: {
    stateend() {
      return this.$store.getters.goodsate
    },
    statusId() {
      return this.$refs.headerChild.formInline
    },
    changeAll() {
      return this.$store.getters.changeAll
    }
  },
  created() {
    this.getllist()
    this.$store.dispatch('user/getalltask')
  },
  methods: {
    changeishow() {
      this.ishow = true
      this.getllist()
    },
    getllist(a = '') {
      const data = { pageIndex: a }
      if (this.ishow) {
        const a = this.changeAll.find(itme => itme.statusName === this.statusId.region)
        data.taskCode = this.statusId.user
        data.status = a.statusId
      }
      this.$store.dispatch('user/getseatchAp', data)
    },
    changelist(a) {
      if (a === 0) {
        this.stateend.pageIndex
        this.getllist(--this.stateend.pageIndex)
      } else {
        this.getllist(++this.stateend.pageIndex)
      }
    }
  }
}
</script>

<style>

</style>
